home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 October / Macformat17.cdr / Shareware City / AfterDark / SimAcid folder / simacid.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-13  |  1.1 KB  |  29 lines  |  [TEXT/KAHL]

  1. #define TRIP_MELTING            1
  2. #define TRIP_RIPPLE                2
  3. #define TRIP_BAD                3
  4.  
  5. #define JAMES_MOAN                128            /* 'snd ' for James' moan */
  6.     
  7. #define JAMES_ZENITH            1000        /* for determining whether James is helping */
  8. #define JAMES_RARELY            900            /* how many times in JAMES_ZENITH he helps */
  9. #define JAMES_SOMETIMES            800
  10. #define JAMES_OFTEN                400
  11. #define JAMES_YOW                200
  12.  
  13. #define NUM_LOOPS                350            /* seems to be a good number, all in all.. */
  14.  
  15. /* record to hold variables */
  16.  
  17. typedef struct AcidStorage {
  18.     Boolean        soundAvailable;                    /* flag that indicates existence of sound. */
  19.     SoundInfo    **soundInfo;                    /* storage for sound. */
  20.     Handle        jamesSound;                        /* the sound(s) to make when the ball bounces. */
  21. } AcidStorage, *AcidStoragePtr, **AcidStorageHandle;
  22.  
  23. static void CleanUp (AcidStorage** storage);                        // all done!
  24. Rect ObtainRect (Rect *monitorRect);                                 // Create random-size rectangle.
  25. unsigned short RangedRdm( unsigned short min, unsigned short max );    // get random number
  26.  
  27. /* an exceptionally ugly macro for exception handling */
  28.  
  29. #define FailNIL(p)        if(!(p)) { CleanUp((AcidStorage**)h); *storage = nil; return -1; }